3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
The 3D Viewer supports the Drag and Drop Manager to allow you to transfer 3DMF data between applications, the Clipboard, and the Scrapbook. The user typically initiates dragging from the viewer by dragging a special drag border that surrounds the perimeter of content area of the viewer (see Figure 9 ). The user can also always initiate a drag by holding down the Option key and dragging anywhere in the viewer content area.
Your application can also set the viewer to a special mode in which the only interaction supported is drag and drop. This mode must be explicitly set with the kQ3ViewerDragMode flag.
When drag mode is set via kQ3ViewerDragMode , there is no visual indication that the viewer is in this mode (except that the cursor behaves appropriately), and none of the controls except the badge in the viewer are active. Therefore, it is only appropriate for an application to use the drag mode briefly or when the controller strip is not displayed (for example when the badge is displayed).
Figure 9 A viewer object displaying the drag and drop border
The drag and drop functionality of the viewer is fully configurable through a set of flags using the Q3ViewerSetFlags function. Drag and drop can be disabled with the kQ3ViewerDraggingOff flag. Dragging out of and into the viewer can be independently disabled via the kQ3ViewerDraggingOutOff and kQ3ViewerDraggingInOff flags respectively. You can turn off the display of the drag border by clearing the kQ3ViewerDrawDragBorder flag.
The version 1.1 release of the 3D Viewer for Win32 supports only dropping files onto the viewer window via the WM_DROPFILES mechanism. A Win32 application wanting to support full drag and drop with the 3D Viewer needs to use the OLE data transfer interfaces.
Previous | QD3D Book | Overview | Chapter Contents | Next |